//
//  ForgetViewController.m
//  02_拉勾的3个界面
//
//  Created by dllo on 16/7/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ForgetViewController.h"
#import "AccountView.h"

@interface ForgetViewController ()
@property (nonatomic, strong) AccountView *phoneNumberView;
@property (nonatomic, strong) AccountView *securityCodeView;
@end

@implementation ForgetViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.navigationController.navigationBarHidden = NO;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UILabel *verifyLabel = [[UILabel alloc] initWithFrame:CGRectMake(165, 84, 85, 25)];
    verifyLabel.text = @"验证手机";
    [self.view addSubview:verifyLabel];
    
    self.phoneNumberView = [[AccountView alloc] initWithFrame:CGRectMake(20, 131, 374, 52) image:[UIImage imageNamed:@"phone"] backgroundColor:[UIColor whiteColor]];
    self.phoneNumberView.textField.placeholder = @"手机号(仅支持中国大陆号)";
    [self.phoneNumberView.textField setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
    [self.view addSubview:self.phoneNumberView];
    
    self.securityCodeView = [[AccountView alloc] initWithFrame:CGRectMake(20, 187, 374, 52) image:[UIImage imageNamed:@"securityCode"] backgroundColor:[UIColor whiteColor]];
    self.securityCodeView.textField.placeholder = @"请输入验证码";
    [self.securityCodeView.textField setValue:[UIColor lightGrayColor] forKeyPath:@"_placeholderLabel.textColor"];
    
    UIButton *securityCodeButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [securityCodeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
    [securityCodeButton setTitleColor:[UIColor colorWithRed:73 / 255.0f green:183 / 255.0f blue:144 / 255.0f alpha:1] forState:UIControlStateNormal];
    securityCodeButton.frame = CGRectMake(8, 0, 105, 55);
    self.securityCodeView.textField.rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 121, 55)];
    self.securityCodeView.textField.rightViewMode = UITextFieldViewModeAlways;
    [self.securityCodeView.textField.rightView addSubview: securityCodeButton];
    [self.view addSubview:self.securityCodeView];
    
    UIView *linePhoneView = [[UIView alloc] initWithFrame:CGRectMake(20, 184, 374, 1)];
    linePhoneView.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:linePhoneView];
    
    UIView *lineSecurityView = [[UIView alloc] initWithFrame:CGRectMake(20, 238, 374, 1)];
    lineSecurityView.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:lineSecurityView];
    
    UIButton *nextButton = [UIButton buttonWithType:UIButtonTypeSystem];
    nextButton.frame = CGRectMake(20, 268, 374, 50);
    [nextButton setTitle:@"下一步" forState:UIControlStateNormal];
    [nextButton setTitleColor:[UIColor colorWithRed:60 / 255.0f green:167 / 255.0f blue:119 / 255.0f alpha:1] forState:UIControlStateNormal];
    [self.view addSubview:nextButton];
    
    UILabel *emailFindLabel = [[UILabel alloc] initWithFrame:CGRectMake(27, 331, 159, 23)];
    emailFindLabel.text = @"邮箱用户找回密码,请";
    emailFindLabel.textColor = [UIColor lightGrayColor];
    [self.view addSubview:emailFindLabel];
    
    UIButton *pressHereButton = [[UIButton alloc] initWithFrame:CGRectMake(182, 331, 71, 23)];
    [pressHereButton setTitle:@"点击这里" forState:UIControlStateNormal];
    [pressHereButton setTitleColor:[UIColor colorWithRed:63 / 255.0f green:173 / 255.0f blue:128 / 255.0f alpha:1] forState:UIControlStateNormal];
    pressHereButton.titleLabel.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
    [self.view addSubview:pressHereButton];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
